package ch7;
//小轿车
public class Car {
    private String licencePlate, color;

    public Car(String licencePlate, String color) {
        this.licencePlate = licencePlate;
        this.color = color;
    }

    public String getLicencePlate() {
        return licencePlate;
    }

    public void setLicencePlate(String licencePlate) {
        this.licencePlate = licencePlate;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public void start() {
        System.out.println("启动");
    }

    public void accelerate() {
        System.out.println("加速");
    }

    public void brake() {
        System.out.println("刹车");
    }
    public void show() {
        System.out.println("这台车子的车牌是：" + this.licencePlate + ",颜色是" +
                this.color + "色。");}
    public void introduce() {
        this.show();
        System.out.println("这台车可以");
        this.start();
        this.accelerate();
        this.brake();
    }
}
